<form id="add-form" class="form-horizontal" method="POST" action="{:url('ysave')}">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">页面名称:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" name="name" value="{$data['name']|default=''}" />
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">页面描述:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea type="text" name="des" class="form-control">{$data['des']|default=''}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">前台/后台:</label>
        <div class="col-xs-12 col-sm-8">
            <label style="font-weight: normal;margin-right: 15px;cursor: pointer;"><input style="position: relative;top: 3px;" name="admin_home" value="1" {if condition="(!empty($data)) AND $data['admin_home'] == 1"}checked{/if} type="radio">前台</label>
            <label style="font-weight: normal;margin-right: 15px;cursor: pointer;"><input style="position: relative;top: 3px;" name="admin_home" value="2" {if condition="(!empty($data)) AND $data['admin_home'] == 2"}checked{/if} type="radio">后台</label>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">所属板块:</label>
        <div class="col-xs-12 col-sm-8">
            <select class="form-control" name="plate_id" >
              {volist name="plate" id="vo"}
                <option value="{$vo.id}" {if condition="((!empty($data)) AND $vo['id'] eq $data['plate_id']) OR ($vo['id'] eq $plate_id)"}selected{/if}>{$vo.name}</option>
                {volist name="vo['son']" id="son"}
                 <option value="{$son.id}" {if condition="((!empty($data)) AND $son['id'] eq $data['plate_id']) OR ($son['id'] eq $plate_id)"}selected{/if}>---{$son.name}</option>
                {/volist}

               {/volist} 
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">应用类型:</label>
        <div class="col-xs-12 col-sm-8">
            {volist name="app_type" id="vo"} 
              <label style="font-weight: normal;margin-right: 15px;cursor: pointer;"><input style=" position: relative;top: 2px;" name="type_id[]" value="{$vo.id}" {if condition="(!empty($data)) AND in_array($vo['id'],$data['type_id'])"}checked{/if} type="checkbox">{$vo.name}</label>
             {/volist}  
        </div>
    </div>
    <!--<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">风格图:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="col-xs-12 col-sm-12">
                <div class="fixed-table-body">
                    <table id="table" class="table table-striped table-bordered table-hover" width="100%">
                        <thead>
                            <tr>
                                <th style="text-align: center; vertical-align: middle; ">
                                    <div class="th-inner ">编号</div>
                                </th>
                                <th style="text-align: center; vertical-align: middle; ">
                                    <div class="th-inner ">类型</div>
                                </th>
                                <th style="text-align: center; vertical-align: middle; ">
                                    <div class="th-inner ">操作</div>
                                </th>
                            </tr>
                        </thead>
                        <tbody data-listidx="0">
                            <tr data-index="0">
                                <td style="text-align: center; vertical-align: middle;">
                                    s0001
                                </td>
                                <td style="text-align: center; vertical-align: middle;">
                                    页面风格图
                                </td>
                                <td style="text-align: center; vertical-align: middle;">
                                    <a href="javascript:;" class="btn btn-xs btn-success">
                                        查看 
                                    </a>
                                    <a href="javascript:;" class="btn btn-xs btn-success">
                                        编辑
                                    </a>
                                    <a href="javascript:;" class="btn btn-xs btn-danger">
                                        删除
                                    </a>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="col-xs-12 col-sm-12" style="text-align: center;">
                <a class="btn btn-xs btn-success my-upload" href="javascript:;">上传</a>
            </div>
        </div>
    </div>-->


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
             <input type="hidden" name="id" value="{$data['id']|default=''}" class="form-control"/>
            <button type="submit" class="btn btn-success">{:__('OK')}</button>
        </div>
    </div>
</form>